import request from '@/utils/request'

// 查询网关基本信息列表
export function listGatewayInfo(query) {
  return request({
    url: '/manage-api/business/gatewayInfo/list',
    method: 'get',
    params: query
  })
}

// 查询网关基本信息详细
export function getGatewayInfo(gatewayInfoId) {
  return request({
    url: '/admin-api/business/gatewayInfo/' + gatewayInfoId,
    method: 'get'
  })
}

// 新增网关基本信息
export function addGatewayInfo(data) {
  return request({
    url: '/admin-api/business/gatewayInfo',
    method: 'post',
    data: data
  })
}

// 修改网关基本信息
export function updateGatewayInfo(data) {
  return request({
    url: '/admin-api/business/gatewayInfo',
    method: 'put',
    data: data
  })
}

// 修改网关绑定的流量卡
export function updateGatewayInfoFlowCard(data) {
  return request({
    url: '/admin-api/business/gatewayInfo/editFlowCard',
    method: 'put',
    data: data
  })
}

// 删除网关基本信息
export function delGatewayInfo(gatewayInfoId) {
  return request({
    url: '/admin-api/business/gatewayInfo/' + gatewayInfoId,
    method: 'delete'
  })
}

export function batchUpdateExpire(data) {
  return request({
    url: '/admin-api/business/gatewayInfo/batchUpdateExpire',
    method: 'post',
    data: data
  })
}

export function pay(data) {
  return request({
    url: '/admin-api/business/gatewayInfo/pay',
    method: 'post',
    data: data
  })
}

// 导出
export function exportGatewayInfo(data) {
    return request({
        url: '/admin-api/business/gatewayInfo/export',
        method: 'post',
        params: data
    })
}
